<#include "../../common/commonattribute.html"/>
<script>
$(document).on('bjui.beforeCloseDialog', function(e) {
        $(".search-blogbanner").click();
    })
function pic_upload_success(file, data) {
    var json = $.parseJSON(data)
    $(this).bjuiajax('ajaxDone', json)
    if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
        $('#j_custom_pic').val(json.filename).trigger('validate')
        $('#j_custom_span_pic').html('<img src="'+ json.filename +'" width="100" />')
    }
}
</script>
<div class="bjui-pageContent">

    <form action="${ctx}/bizlogic/blogbanner/save" id="familyMemberDialog" data-no-check="true" name="familyForm"
          data-toggle="validate" data-alertmsg="false" data-isrefsh="false" data-callback="fmDialogClose"
          data-rule="required">
        <div style="margin:25px auto 0; width:500px;">

            <input type="hidden" name="id" value="${entity.id!}"/>
            <table width="100%"  class="table table-condensed table-hover">

                <tr>
                    <td class="right"><span style="color:red">*</span>banner上传</td>
                    <td><span id="j_custom_span_pic"><#if (entity.imgSrc)??><img width="100px" height="60px" src="${entity.imgSrc}"/></#if></span></td>
                    <td class="left"><div style="display: inline-block; vertical-align: middle;">
                        <div id="j_custom_pic_up" data-toggle="upload" data-uploader="${ctx}/upload?sessionid=?"
                             data-file-size-limit="1024000000"
                             data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
                             data-multi="true"
                             data-on-upload-success="pic_upload_success"
                             data-icon="cloud-upload"></div>
                        <input type="hidden" name="imgSrc" value="${entity.imgSrc!}" id="j_custom_pic">

                    </div></td>

                </tr>
                <tr>
                    <td class="right"><span style="color:red">*</span>文章地址</td>
                    <td class="left"><input type="text" name="articleUrl" data-rule="required" value="${entity.articleUrl!}"></td>
                    <td></td>
                </tr>
                <tr>
                    <td class="right"><span style="color:red">*</span>是否启用</td>
                    <td class="left"><div class="row-input required">
                        <input type="radio" name="isOpen" id="j_custom_sex1" data-toggle="icheck" value="1" data-rule="checked" <#if (entity.isOpen??)&&(entity.isOpen)==1> checked</#if> data-label="是  ">
                        <input type="radio" name="isOpen" id="j_custom_sex2" data-toggle="icheck" value="0" <#if (entity.isOpen??)&&(entity.isOpen)==0> checked</#if> data-label="否">
                    </div></td>
                    <td></td>
                </tr>



            </table>

        </div>
    </form>

</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close">关闭</button></li>
        <li><button type="submit" class="btn-default">保存</button></li>
    </ul>
</div>